#-*-coding:utf-8-*-
'''
Created on 2011-1-14

@author: zhaoyh
'''
import web
from config import view
urls = (
    '/',                                    'portal.controllers.main.index',
    '/sidebar',                             'portal.controllers.main.sidebar',
    '/settings/edit/',                       'portal.controllers.settings.edit',
    '/auth/(login|logout|changepwd|user)',        'auth',
    '/user/(|list)',                        'portal.controllers.user.list',
    '/user/add',                            'portal.controllers.user.add',
    '/user/edit/(.*)',                      'portal.controllers.user.edit',
    '/user/delete/(.*)',                    'portal.controllers.user.delete',
    '/group/(|list)',                       'portal.controllers.group.list',
    '/group/add',                           'portal.controllers.group.add',
    '/group/edit/(.*)',                     'portal.controllers.group.edit',
    '/group/delete/(.*)',                   'portal.controllers.group.delete',
    '/company/edit/(.*)',                   'portal.controllers.company.edit',
    '/department/(|list)',                  'portal.controllers.department.list',
    '/department/add',                      'portal.controllers.department.add',
    '/department/edit/(.*)',                'portal.controllers.department.edit',
    '/department/delete/(.*)',               'portal.controllers.department.delete',
    '/employee/(|list)',                    'portal.controllers.employee.list',
    '/employee/add',                        'portal.controllers.employee.add',
    '/employee/edit/(.*)',                  'portal.controllers.employee.edit',
    '/employee/delete/(.*)',                 'portal.controllers.employee.delete',
    'log',                                  'portal.controllers.log')

app = web.application(urls, globals())

if __name__ == "__main__":
    app.run()